package com.example.s.Activity.team;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.example.s.Activity.BaseActivity;
import com.example.s.R;
import com.example.s.adapter.InnerHolder;
import com.example.s.adapter.MyRecyclerViewAdapter;
import com.example.s.bean.TeamItem;

import java.util.ArrayList;
import java.util.List;

public class MyTeamActivity extends BaseActivity {
    private ImageView back;
    private RecyclerView myTeamRv;
    private List<TeamItem> mMyTeamList = new ArrayList<>();
    private MyRecyclerViewAdapter<TeamItem> mMyTeamAdapter;
    private void initView() {

        back = (ImageView) findViewById(R.id.back);
        myTeamRv = (RecyclerView) findViewById(R.id.myTeamRv);

    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_team);
        initView();

        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        setMyTeamData();
        setMyTeamAdapter();
    }

    private void setMyTeamData() {

    }

    private void setMyTeamAdapter(){
        myTeamRv.setLayoutManager(new LinearLayoutManager(this));
        myTeamRv.setAdapter(mMyTeamAdapter = new MyRecyclerViewAdapter<TeamItem>(mMyTeamList,R.layout.rv_team_item) {
            @Override
            public void handleData(InnerHolder holder, TeamItem item) {

            }
        });
    }


}
